Skip to content

Remove dead TokenInfo.Expires field and broken calculations#79

Merged
telegrapher merged 1 commit into
fix/misc-hardeningfrom
fix/remove-dead-expires-field
Feb 27, 2026
Merged

Remove dead TokenInfo.Expires field and broken calculations#79
telegrapher merged 1 commit into
fix/misc-hardeningfrom
fix/remove-dead-expires-field

Conversation

@telegrapher

Copy link
Copy Markdown
Collaborator

Summary

  • Remove TokenInfo.Expires field that was set in 3 places but never read by any caller
  • The calculations were also wrong: duration * duration produces nanoseconds-squared (overflow), and refresh.go used time.Second while the others used time.Millisecond
  • Removes unused time import from exchange.go and refresh.go

The Expires field was set in jwt_exchange.go, exchange.go, and refresh.go
but never read by any caller. The calculations were also wrong:
duration * duration produces nanoseconds-squared (overflow), and
refresh.go used time.Second while the others used time.Millisecond.

Remove the field entirely rather than fixing dead code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@telegrapher
telegrapher merged commit ffa0883 into fix/misc-hardening Feb 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants